﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SpringStudio.DAL
{
    /// <summary>
    /// 数据访问工厂
    /// </summary>
    internal class DbFactory
    {
        /// <summary>
        /// 创建数据访问对象
        /// </summary>
        public IDataBase Create()
        {
            switch (DataBaseTypeReader.Default)
            {
                case DataBaseType.Mssql:
                    return new Implement.Mssql();

                case DataBaseType.Oracle:
                    return new Implement.Oracle();

                default:
                    return null;
            }
        }
    }
}
